package cn.tutu.blockchain.exchange.service;

import java.util.List;

import com.github.pagehelper.PageInfo;

import cn.tutu.blockchain.common.Page;
import cn.tutu.blockchain.exchange.entity.Exchange;

public interface ExchangeService {

	void create(Exchange exchange);

	void modifyStatus(Exchange exchange);

	PageInfo<Exchange> getByUserId(String userId, Page page);

	/**
	 * 根据状态获取交易号
	 * 
	 * @param string
	 * 
	 * @return
	 */
	List<Exchange> getByStatus(String status);

	/**
	 * 根据状态获取第一个
	 * 
	 * @param code
	 * @return
	 */
	Exchange getOneByStatus(String code);

	void modifyLastDate(String id);

}
